// EnumSD.cpp : Defines the entry point for the console application.
//
#include "device.h"
#include <iostream>
int main(int argc, char* argv[])
{
    for(wchar_t drv_number = L'A'; drv_number <= L'Z'; drv_number++){
        try{
            Device drv(drv_number);
			std::wcout << drv_number << ":\\ " << drv.GetVolume() << std::endl;
            if(drv.IsSdCard()){
                std::wcout << drv_number << L" is a sd card" << std::endl;
            }
        }
        catch(no_volume_exception& ve){
			std::wcout << ve.what() << std::endl;
        }
        catch(no_device_exception& cfe){
			std::wcout << cfe.what() << std::endl;
        }
		catch(...){
			//std::wcout << de.what() << std::endl;
		}
	}
    system("PAUSE");
    return 0;
}
